package com.bw.zg2.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy.REPLACE
import androidx.room.Query
import com.bw.zg2.bean.SearchHistory

/**
 *
 * @ClassName: SearchHistoryDao
 * @Description: java类作用描述
 * @Author: zhangyanchao
 * @CreateDate: 2024/9/20 12:06 PM
 * @Version: 1.0
 */
@Dao
interface SearchHistoryDao {
    @Insert(onConflict = REPLACE)
    fun insert(bean: SearchHistory)

    @Query("select * from search_history")
    fun getSearchHistory(): List<SearchHistory>

    @Query("delete from search_history")
    fun delete()
}